package com.example.userpointmgr;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.ArrayList;

@Configuration
@EnableSwagger2
public class SwaggerConfiguration {
    private static ApiInfo DEFAULT=null;

    @Bean
    public Docket docket(){
        Contact DEFAULT_CONTACT=new Contact("hujie","联系url","邮箱");
        DEFAULT=new ApiInfo(
                "userPointMgr",
                "这是描述",
                "v1.0",
                "",
                DEFAULT_CONTACT,
                "",
                "",
                new ArrayList());
        return new Docket(DocumentationType.SWAGGER_2).apiInfo(DEFAULT);
    }
}
